
<%@page import="shmged.com.shlcm.reimbursement.CmShowReimbursementEntry"%>
<%@page import="shmged.com.shlcm.reimbursement.CmCreateReimbursementEntry"%>
<%@page import="shmged.com.shlcm.utils.CmCreateDocHelper"%><%@ page language="java" contentType="utf-8" pageEncoding="utf-8"%>
    <%@page import="java.util.*"%>
    <%@page import="java.io.OutputStream"%>
  <%@page import="org.apache.poi.hssf.usermodel.HSSFWorkbook" %> 
  <%@page import="java.io.File"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.io.OutputStream"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="wt.util.WTProperties"%> 
<%
 	String oids=request.getParameter("oids");
 String oid[]=oids.split("__");
 String ids=oid[0];
 String oidss=oids.substring(oids.indexOf("__")+2);
 List list=new ArrayList<String>();
 for(int i=1;i<oid.length;i++){
 	list.add(oid[i]);
 }

 String path=CmShowReimbursementEntry.getSecendFilesToZip(ids,list);

 	File file = new File(path);
 	FileInputStream in = new FileInputStream(file);
 	java.util.Date curTime = new java.util.Date();
 	String exportFileName =file.getName();
 	exportFileName = URLEncoder.encode(exportFileName,"UTF-8");
 	response.reset();
 	response.setHeader("Content-disposition", "attachment; filename=" + exportFileName + "\";");
 	  out.clear();
 	  out = pageContext.pushBody();
 	  OutputStream os = response.getOutputStream();
 	  int c;
 	while((c=in.read())!=-1)
 	{ 
 		os.write(c);
 	}
 	  os.flush();
 	  os.close();
 	  out = pageContext.pushBody();
 %>  



